var Design = Class({
    Implements : [Events, Options],
    options: {
    }, 
    init: function(){
        var rh = this; 
        var scroll = new Fx.Scroll('content', {wait: false, duration: 1000, offset: {'x': 0, 'y': -125}, transition: Fx.Transitions.Quad.easeInOut });
       
        $$('a.menu-link').each(function(link_obj){
             if(link_obj.retrieve('added') != true){         
                var caller = link_obj.get('rev');
                var area = link_obj.get('rel');
                if(caller!=null && area !=null){
                    link_obj.store('added', true);   
                    link_obj.addEvent('click', function(e) {
                        e = new Event(e).stop();
                        scroll.toElement(area); 
                        $$('li').each(function(m)
                        {
                            if(m.hasClass('node-menu')){
                               m.removeClass('active'); 
                            }
                        });
                        var emenu = link_obj.getParent('.node-menu');
                        emenu.addClass('active');   
                     }); 
                 }
            }
        });
        $$('a.style-link').each(function(link_obj){
             if(link_obj.retrieve('added') != true){         
                var caller = link_obj.get('rev');
                var area = link_obj.get('rel');
                if(caller!=null && area !=null){
                    link_obj.store('added', true);   
                    link_obj.addEvent('click', function(e) {
                        e = new Event(e).stop();
                        //Transitions the background color of the Element from its current color to blue:
                        //$('container').removeClass('container-1');
                        $('container').setProperty('class','container-' + area);
                        //var newclass = '.container-' + area;
                        //var myFx = new Fx.Morph('container', {duration: 500, transition: Fx.Transitions.Sine.easeOut});
                       
                        //myFx.start({'background-color': '#123'});
                           
                        //$('container').morph('container-' + area);

                     }); 
                 }
            }
        });
    }, 
    fireDomReady: function()
    {
        window.fireEvent('domready');
    }
    
});  

